]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
rfkill: hide Airplane Mode indicator when g-s-d says so
authorCosimo Cecchi <cosimoc@gnome.org>
Mon, 8 Sep 2014 22:17:24 +0000 (15:17 -0700)
committerBastien Nocera <hadess@hadess.net>
Fri, 7 Nov 2014 09:29:13 +0000 (10:29 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=736292

js/ui/status/rfkill.js

index 545ce7c0890436b5e53c35a4c2d8a6ca214a26ce..e2a57208e39f4d182a7d4ecaa440590081c84495 100644 (file)
@@ -15,6 +15,7 @@ const RfkillManagerInterface = '<node> \
 <interface name="org.gnome.SettingsDaemon.Rfkill"> \
 <property name="AirplaneMode" type="b" access="readwrite" /> \
 <property name="HardwareAirplaneMode" type="b" access="read" /> \
+<property name="ShouldShowAirplaneMode" type="b" access="read" /> \
 </interface> \
 </node>';
 
@@ -48,6 +49,10 @@ const RfkillManager = new Lang.Class({
         return this._proxy.HardwareAirplaneMode;
     },
 
+    get shouldShowAirplaneMode() {
+        return this._proxy.ShouldShowAirplaneMode;
+    },
+
     _changed: function() {
         this.emit('airplane-mode-changed');
     }
@@ -101,9 +106,10 @@ const Indicator = new Lang.Class({
     _sync: function() {
         let airplaneMode = this._manager.airplaneMode;
         let hwAirplaneMode = this._manager.hwAirplaneMode;
+        let showAirplaneMode = this._manager.shouldShowAirplaneMode;
 
-        this._indicator.visible = airplaneMode;
-        this._item.actor.visible = airplaneMode;
+        this._indicator.visible = (airplaneMode && showAirplaneMode);
+        this._item.actor.visible = (airplaneMode && showAirplaneMode);
         this._offItem.setSensitive(!hwAirplaneMode);
 
         if (hwAirplaneMode)